﻿package hunterCommonlib.display.animation 
{
	import flash.display.DisplayObject;
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.utils.Timer;
	
	/**
	 * ...
	 * @author ...
	 */
	public class Animation extends Sprite
	{
		protected var _timer:Timer;
		protected var _rate:uint
		protected var _beginFrame:uint;
		protected var _endFrame:uint; 
		protected var _loop:Boolean;
		protected var _count:uint;
		public var content:DisplayObject;
		protected var _children:Array;
		public function Animation() 
		{
			super();
			_timer = new Timer();
		}
		public function stopAll():void {
			for (var i:uint = 0; i < numChildren; i++) {
				MovieClip(getChildAt(i)).stop();
			}
		}
		public function set rate(rate:uint):void {
			_rate = rate;
		}
		public function get rate():uint {
			return _rate;
		}
		public function startPlay():void {
			if (_timer.running) {
				_timer.stop();
			}
		}
		public function stopPlay():void {
			if (!_timer.running) {
				_timer.play();
			}
		}
		public function goto():void {
			
		}
	}
	
}